Repository navigation
fix(relinker): discover required guest module identities - #1503
Conversation
d70178b to
7d3b393
Compare
klosixgaming-arch
left a comment
There was a problem hiding this comment.
Excellent implementation of guest module identity resolution. This is a significant improvement for compatibility with titles that use non-standard module naming or .suprx files.
Strengths:
- Comprehensive implementation of module identity parsing from ELF metadata (both standard and SCE-specific dynamic tags)
- Proper handling of ambiguous or missing module identities with clear error messages
- Extensive test coverage including edge cases (ambiguous identities, malformed metadata, case-insensitive matching on Windows, multiple identities per module)
- Clean separation of concerns:
ReadModuleNamesfor parsing, identity resolution integrated into the build process
Technical notes:
- The approach of scanning for unresolved needed modules and then searching by identity is correct
- Proper validation of module names (no path separators, non-empty)
- Good handling of both
.prxand.suprxextensions with appropriate suffix matching - Test cases properly verify all resolution scenarios including priority ordering (filename > SONAME > identity)
This will improve compatibility with titles that use modules with different physical names than their logical identities. Ready to merge.
|
Verified on Linux against today's Your CI claim holds. Run 37767916497 is Merge and tests The negative control is the part I care about most, and it passes honestly: with The stacked pair lands cleanly — I checked, because #1617 is by you and touches the same four files So this is not a duplicate-PR situation: One substantive point: the two dependency walks disagree.
Two smaller things, both labelled as such:
Two process notes, neither about the code. The only review on this PR is an Written with AI assistance. |
|
@Dextroid17 Thanks for running the regressions independently. Addressed in 188dd9f:
All 37 registered relinker groups pass locally on Windows, along with conventions and diff checks. The updated dependent #1617 passes 38 groups and retains its failing parent negative control. The descriptions now distinguish these results from historical title runs; CI for the new heads is still running. AI-assisted: yes |
|
Re-checked The Nothing further from me on the code — the three review points are discharged. One thing that is not the code, and it is yours to decide. The Written with AI assistance. |
|
The macOS Relinker job on AI-assisted: yes |
|
Confirmed the permission wall independently — I cannot re-run it either. My account's repo permissions are I did check the run rather than just the badge, and it confirms your read: Every job in that run is It is also not a repo-wide macOS problem right now: a Build run on So: the code and the other four jobs are clean, and the only missing piece is a maintainer pressing re-run on that leg. Written with AI assistance. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
For the cancelled macOS job: a contributor account cannot re-run it, but a fork can run the same workflow itself — the workaround was documented in #1631: gh workflow run build.yml -R <your-fork>/AnyPS5 --ref <branch>
|
|
The missing macOS result is now available for unchanged head This runs the branch head through the existing workflow, not a merge with current main. It is separate evidence and leaves the cancelled upstream check unchanged. The fork run is now complete: both full-runtime build/test jobs (Linux and Windows) and all three relinker jobs (Linux, Windows and macOS) pass. No code or workflow changes were needed. The PR body now links the result. AI-assisted: yes |
|
188dd9f merges main into the branch; please rebase onto main and force-push instead. PR branches here don't carry merge commits. |
188dd9f to
c7a2eea
Compare
|
Rebased and squashed onto main Final-commit Windows relinker builds and conventions pass. The parent passes 39/40 registered groups and the child 40/41 within the 30-second limit; the unchanged TLS group times out on both and passes separately in 42.70 s and 33.13 s. These limits are disclosed in both descriptions. The optional AMD assembly case is skipped locally. CI is now complete for both heads: Linux/macOS relinker jobs pass; Windows passes our regressions and TLS but fails the unchanged upstream Prepared with AI assistance. |
|
Rebase and CI status noted — and thank you for disclosing the 30-second limit and the Windows I have not re-run the relinker suites on Written with AI assistance. |
c7a2eea to
98c47df
Compare
|
Upstream #2151 has now fixed the unsupported AMDGPU-target probe. Rebased onto main The new #1503 CI and #1815 CI pass all three relinker platforms and conventions. Windows passes 41/41 and 42/42 registered groups, with TLS at 7.39 s and 9.27 s. These runs test the PR merges into that main; full-runtime jobs were skipped. The local 30-second TLS limit still fails on both; separate diagnostic runs finish in 33.41 s and 31.51 s. The optional AMD assembly case skips locally. Both descriptions retain these limits and distinguish the earlier title evidence from this rebase. Prepared with AI assistance. |
|
Checked on Linux, merged onto current main: relinker build and ctest 43/43 pass; |
…equired-identities fix(relinker): discover required guest module identities
What
Castlevania Dominus Collection (PPSA15645, 01.003.000) supplies required modules at the game root under filenames that differ from their declared identities. For example,
dra01.prxdeclareslibdra01, while the executable requestslibdra01.suprx. The filename scan misses the supplied provider.Resolve declared guest identities after the existing exact filename/SONAME and Windows filename matching. Inspect ELF
.prx,.sprxand.suprxmetadata for unresolved executable startup dependencies, convert matching providers while retaining their relative paths, and reject ambiguous identities. Both dependency walks use main's strict shared parser; discovered paths are deduplicated before moving parsed images. Import normalization and identity matching both handle.sprx.This remains executable-startup discovery, not transitive/plugin discovery. Genuinely missing providers and symbols still fail. No original game file needs renaming or moving, and lifecycle ownership is unchanged.
Rebased onto main
d70b89989473ba1f6ae13e44e079e67f1f8a44b0as98c47df9e5fc8eb2cf6c2abfa71c024b46821d19, including the already-merged upstream CI fix #2151. No merge commits were added. The resulting tree equals the conflict-free combination of the previous headc7a2eea7and that main;git range-diffconfirms the contribution patch is unchanged.Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release relinker-only build and tests at final commit
98c47df9e5fc8eb2cf6c2abfa71c024b46821d19:git diff --checkpass.tls_function_coveragetest times out at 30 seconds. That complete group passes separately in 33.41 seconds. This is not a clean 30-second suite. No repository timeout was raised. The optional AMD assembler case withinhardware_oracleis skipped locally because its required tools are absent..sprxfixture fails on7d3b3930and passes on the corrected implementation. These controls were not rerun for this history-only update.libdra01.suprxbefore the correction; the candidate converts all 12 and reaches the unrelated missing Pad importn3kSX62fgNo. Both used identical, older host libraries from3c054008, with original relative paths retained. No new title run, menu, gameplay or performance result is claimed for this rebase.The current PR-merge CI run passes the Linux, Windows and macOS relinker jobs; conventions also pass. These jobs test this head merged into main
d70b8998. Windows passes all 41 registered groups, includinghardware_oracle, identity discovery and TLS (7.39 s). Upstream #2151 skips the optional assembly case when clang lacks AMDGPU support; a passing oracle group is not proof of hardware execution. Full-runtime jobs were skipped by workflow eligibility. No full-runtime build or Linux/macOS execution was performed locally for this update.Overlap rechecked at the pinned main: #1782 adds transitive discovery, #1830 matches filename stems, and #2100 protects registry output from overwriting inputs. Their changes are separate from declared-identity resolution. The inspected combinations with #1782 and #2100 conflict in
GuestModuleBuilder.cpp; whichever lands later needs a rebase. None is included or required. #1815 is a dependent follow-up.Checklist